package br.com.projeto.rulebusiness;

import java.util.List;

import br.com.projeto.dao.CategoryDAO;
import br.com.projeto.databases.DAOFactory;
import br.com.projeto.entities.Category;

public class CategoryRB {
	
	private static CategoryDAO categoryDAO;
	
	public CategoryRB(){
		categoryDAO = DAOFactory.categoryDao();
	}
	
	public void saveCategory(Category category){
		categoryDAO.saveCategory(category);
	}
	
	public void updateCategory(Category category){
		categoryDAO.updateCategory(category);
	}
	
	public void deleteCategory(Category category){
		categoryDAO.deleteCategory(category);
	}
	
	public List<Category> listAllCategories(){
		return categoryDAO.listAllCategories();
	}

}
